//
//  TwERPVehSurfaceViewController.m
//  TwERP
//
//  Created by Xiangyang Li on 12-7-31.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#import "TwERPVehSurfaceViewController.h"
#import "TwERPVehSurfaceView.h"

@interface TwERPVehSurfaceViewController () <VehSurfaceDataSource>

@end

@implementation TwERPVehSurfaceViewController

@synthesize surfaceDataSource =_surfaceDataSource;

-(void) checkSurface
{
    //[self performSegueWithIdentifier:@"Check Surface" sender:self];
}

- (unichar) stateOfIndex:(int)index
{
    
     unichar uch=[self.surfaceDataSource stateOfIndex:index];
    return uch;
}
- (void)setStateOfIndex:(int)index withValue:(unichar)state
{
    [self.surfaceDataSource setStateOfIndex:index withValue:state];
}
-(void) updateOtherSurfaceView
{
    [self.surfaceDataSource updateOtherSurfaceView];
}
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    TwERPVehSurfaceView *sv = (TwERPVehSurfaceView *) self.view;
    sv.editable =YES;
	[sv addGestures];
    
    self.preferredContentSize = CGSizeMake(300, 390);
}

- (void)viewDidUnload
{
    [super viewDidUnload];
    // Release any retained subviews of the main view.
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}

@end
